<h2>User Management</h2>
<button id="newuser">+ Add New User</button>
<div id="account" style="display: none; margin-bottom: 1em;">
<h3>Add New User</h3>
{literal}
<script type="text/javascript">
$(function() {
$('.password').minchar;
$('.password').pstrength();
});
</script>
{/literal}
<form method="post" action="index.php">
<table border="0">
<tr><th>Username</th><td><input type="text" name="username" /></td></tr>
<tr><th>First Name</th><td><input type="text" name="firstname" /></td></tr>
<tr><th>Last Name</th><td><input type="text" name="lastname" /></td></tr>
<tr><th>Email</th><td><input type="text" name="email" /></td></tr>
<tr><th>Password</th><td><input type="text" class="password" name="password" /></td></tr>
<tr><td colspan="2" align="center"><input type="submit" value="Create Account" /></td></tr>
</table>
<input type="hidden" name="p" value="config" />
</form>
</div>



<h3>Active Users</h3>
<table class="results">
<tr><th>Username</th><th>First Name</th><th>Last Name</th><th>Email</th><th>Level</th><th>Last Access</th></tr>
{section name=users loop=$users}
	<tr link="index.php?p=account&ID={$users[users].ID}" class="{cycle values="rowalt1,rowalt2"}">
        <td>{$users[users].username}</td>
        <td>{$users[users].firstname}</td>
        <td>{$users[users].lastname}</td>
        <td>{$users[users].email}</td>
        <td>{if $users[users].admin == 1}Administrator{else}Normal{/if}</td>
        <td>{$users[users].lastlogin|date_format:"%b %e, %Y %I:%M %p"}</td>
	</tr>
{/section}
</table>

<h3>Inactive Users</h3>
<table class="results">
<tr><th>Username</th><th>First Name</th><th>Last Name</th><th>Email</th><th>Level</th><th>Last Access</th></tr>
{section name=users loop=$inactive_users}
	<tr link="index.php?p=account&ID={$users[users].ID}" class="{cycle values="rowalt1,rowalt2"}">
        <td>{$inactive_users[users].username}</td>
        <td>{$inactive_users[users].firstname}</td>
        <td>{$inactive_users[users].lastname}</td>
        <td>{$inactive_users[users].email}</td>
        <td>{if $inactive_users[users].admin == 1}Administrator{else}Normal{/if}</td>
        <td>{$inactive_users[users].lastlogin|date_format:"%b %e, %Y %I:%M %p"}</td>
	</tr>
{/section}
</table>




<script language="javascript">
{literal}
$(function () {
    $('#newuser').click(function () {
        $("#account").toggle("slow");  
    });
});
{/literal}
</script>